import {useState} from "react";
import moment from 'moment';
import {View, Text} from '@tarojs/components';
import {AtIcon} from "taro-ui";
import './index.less';

export default function OrderCard({car, isFromFleet = false}) {
    const {
        carNumber = '',
        vin = '',
        updateTime = '',
        maxSoc = undefined, //开始SOC
        maxMoney = undefined, //结束SOC
    } = car;
    const [open, setOpen] = useState(false)
    return (
        <View className='cardWrap'>
            <View className='cardTitle'>
                <View>
                    <AtIcon prefixClass='icon' value='zuchecheliang' size={24} color='#048FFF'/>&nbsp;
                    {carNumber}
                </View>
            </View>
            <View className='textLine'>
                <View><Text className='label'>车辆品牌:</Text> --</View>
                <View><Text className='label'>车辆型号:</Text> --</View>
                {/*<View><Text className='label'>认证状态:</Text> 未认证</View>*/}
            </View>
            <View className='textLine'>
                <View><Text className='label'>车牌号:</Text> {carNumber}</View>
                <View><Text
                    className='label'>更新时间:</Text> {updateTime && moment(updateTime).format('YYYY.MM.DD HH:mm')}
                </View>
            </View>
            <View className='textLine'>
                <View><Text className='label'>车架号:</Text> {vin}</View>
            </View>
        </View>
    )
}
